package com.team12.hotel404.service.serviceImpl;

import com.team12.hotel404.domain.Comment;
import com.team12.hotel404.mapper.CommentMapper;
import com.team12.hotel404.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CommentServiceImpl implements CommentService {

@Autowired
    private CommentMapper commentMapper;
    @Override
    public List<Comment> listByHotelId(Integer hotelId) {
        return commentMapper.selectByHotelId(hotelId);
    }

    @Override
    public int commentAdd(Comment record) {
        return commentMapper.insert(record);

    }
}
